a='hello'
b='world'
print(a+b)

# c=10
# print(a+c)

print(10+1.1)
print(1+True)
print(1+False)






# a=10
# a=a+1
# print(a)
#
# b=10
# b+=1
# print(b)


#链式赋值
# a=b=10
# #多元赋值
# a,b=10,20

# a=10
# b=20
# tmp=a
# a=b
# b=tmp
# print(a)
# print(b)


# a=10
# b=20
# a,b=b,a
# print(a)
# print(b)


# print(10>20 and 10/0==1)
# print(10<20 or 10/0==1)
# a=1
# b=2
# c=3
# print(a<b<c)
# print(a<b and b<c) #True
# print(a<b and b>c) #False
#
# print(a>b or b>c) #False
# print(a<b or b>c) #True
#
# print(not a<b) #False
# print(not a>b) #True

# print(01.+0.2==0.3)
# print(0.1)
# print(0.2)
# print(0.1+0.2)
# print(0.3)

# a=0.1+0.2
# b=0.3
# print(-0.0000001<(a-b)<0.0000001)

# a='hello'
# b='world'
# print(a<b) #True
# print(a<=b) #True
# print(a>b) #False
# print(a>=b) #False
# print(a==b) #False
# print(a!=b) #True


# a=1
# b=2
# print(a<b) #True
# print(a<=b) #True
# print(a>b) #False
# print(a>=b) #False
# print(a==b) #False
# print(a!=b) #True

#print(1/0) #ZeroDivisionError: division by zero
# print(1/2)  #0.5
# print(9%2) #1
# print(4**2) #16
# print(4**0.5) #2.0
# print(9/2) #4
# print(-9//2) #-5

# #输入 4 个小数, 求 4 个小数的平均值.
# a=input('请输入第一个数字：')
# b=input('请输入第二个数字：')
# c=input('请输入第三个数字：')
# d=input('请输入第四个数字：')
# a=float(a)
# b=float(b)
# c=float(c)
# d=float(d)
# avg=(a+b+c+d)/4
# print(f'平均值为：{avg}')
#


# a=input('请输入第一个整数：')
# b=input('请输入第二个整数：')
# a=int(a)
# b=int(b)
# print(f'a+b={a+b}')


# #通过控制台输入
# num=input('请输入一个整数：')
# print(f'你输入的整数是 {num}')
#

# #通过控制台输出
# print('hello')
# a=1
# print(a)
# b=True
# print(b)
# num=1
# print(f'num={num}')

# 动态类型特性
# a=10
# print(type(a))
# a='hello'
# print(type(a))


# 这是一行注释

"""
这是文档字符串
"""


# a=10
# print(type(a))  #<class 'int'>
# b=0.5
# print(type(b))  #<class 'float'>
# c='hello'
# print(type(c)) #<class 'str'>
# print(len(c))  #5
# d='world'
# print(c+d)  #helloworld
# e=True
# print(type(e))  #<class 'bool'>
# f=False
# print(type(f)) #<class 'bool'>



# print(a)
# print(b)


# a=10
# print(a)
# a=20.0
# print(a)

# print(1+2-3)
# print(1+2*3)
# print(1+2/3)

# #给定四个分数, 67.5, 89.0, 12.9, 32.2 , 编写代码, 求这四个分数的平均数
# print((67.5+89.0+12.9+32.2)/4)
#
# #给定四个分数, 67.5, 89.0, 12.9, 32.2 , 编写代码, 求这四个分数的方差.
# #PS: 方差的计算过程: 取每一项, 减去平均值, 计算平方, 再求和, 最后除以 (项数 - 1)
# avg=(67.5+89.0+12.9+32.2)/4
# total=(67.5-avg)**2+(89.0-avg)**2+(12.9-avg)**2+(32.2-avg)**2
# result=total/3
# print(result)


